export type questionType = 11 | 12 | 13 | 21 | 22 | 23 | 31 | 41 | 42 | 53

export interface IQuestionParams {
  id: string
}

export interface IQuestionResData {
  questionnaireId: number, //问卷ID
  title: string, //问卷标题
  describe: string, //问卷描述
  questionList: IQuestionItem[] //问题列表
}

export interface IQuestionItem {
  questionId: number, //问题ID
  title: string, //问题标题,
  answerList: IAnswerItem[] //问题答案列表
  questionType: questionType //回答选项的类型11单选-文字，12单选-图片，13单选-图文，21多选-文字，22多选-图片，23多选-图文，31填空，41日期选择，42数字选择
  checkedIds?: number[] //选中项
}

export interface IAnswerItem {
  answerId: number, //回答选项ID
  questionId: number, //问题ID
  img?: string, //回答选项的图片
  words?: string //回答选项的文字
}

export interface IAnswerSubmitParams {
  appUserId: string | number, //用户ID
  questionnaireId: string | number, //问卷ID
  answerList: IAnswerItemSubmitParams[] //问卷选项答案列表
}

export interface IAnswerItemSubmitParams {
  questionId: number, //问题ID
  answerIds: number[], //问题答案ID数组
  words: string //问题填空文本
}

export interface IFeedbackParams {
  questionnaireId: string, //问卷ID
  feedbackContent: string, //反馈内容
}